/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$(function(){
    $(".menuLink").click(function(){
        var url=$(this).attr("name");
        if(url!=null && url !='' && url !=undefined){
              refreshDiv("test.jsp","","centerContent");
        }
    });
    refreshDiv = function(url,data,divID){
        $.ajax({
            url:""+url,
            data:""+data,
            cache:false,
            success:function(response2){
                $('#'+divID).html("");
                $('#'+divID).html(response2);
            }
        });
    }
    formSubmit = function(button){
          var url = $(button).attr("name");
          var dataForm =$(button).attr("form");
          $.ajax({
            url:""+url,
            data:""+$("#"+dataForm).serialize(),
            cache:false,
            success:function(response2){
                $('#centerContent').html("");
                $('#centerContent').html(response2);
            }
        });
    };
})
